﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NineMine.DataModel
{
    public class Message
    {
        [Key]
        public long Id { get; set; }

        [Required]
        public Board Board { get; set; }

        public long ParentId { get; set; }

        [MaxLength(255)]
        [Required]
        public string Subject { get; set; }

        [Column(TypeName = "ntext")]
        public string Content { get; set; }

        public User Author { get; set; }

        public long RepliesCount { get; set; }

        public long LastReplyId { get; set; }

        public DateTime CreatedOn { get; set; }

        public DateTime UpdatedOn { get; set; }

        public bool Locked { get; set; }

        public long Sticky { get; set; }
    }
}
